3.7.92 \(\int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx\) [692]

3.7.92.1 Optimal result
3.7.92.2 Mathematica [B] (verified)
3.7.92.3 Rubi [A] (verified)
3.7.92.4 Maple [B] (verified)
3.7.92.5 Fricas [B] (verification not implemented)
3.7.92.6 Sympy [F(-1)]
3.7.92.7 Maxima [F(-2)]
3.7.92.8 Giac [B] (verification not implemented)
3.7.92.9 Mupad [B] (verification not implemented)

3.7.92.1 Optimal result

Integrand size = 25, antiderivative size = 245 \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\frac {b^3 x}{d^3}-\frac {\left (81 b c d^4-27 d^3 \left (2 c^2+d^2\right )-9 b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )\right ) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{d^3 \left (c^2-d^2\right )^{5/2} f}+\frac {(b c-3 d)^2 \cos (e+f x) (3+b \sin (e+f x))}{2 d \left (c^2-d^2\right ) f (c+d \sin (e+f x))^2}+\frac {(b c-3 d)^2 \left (2 b c^2+9 c d-5 b d^2\right ) \cos (e+f x)}{2 d^2 \left (c^2-d^2\right )^2 f (c+d \sin (e+f x))} \]

output
b^3*x/d^3-(9*a^2*b*c*d^4-a^3*d^3*(2*c^2+d^2)-3*a*b^2*d^3*(c^2+2*d^2)+b^3*( 
2*c^5-5*c^3*d^2+6*c*d^4))*arctan((d+c*tan(1/2*f*x+1/2*e))/(c^2-d^2)^(1/2)) 
/d^3/(c^2-d^2)^(5/2)/f+1/2*(-a*d+b*c)^2*cos(f*x+e)*(a+b*sin(f*x+e))/d/(c^2 
-d^2)/f/(c+d*sin(f*x+e))^2+1/2*(-a*d+b*c)^2*(3*a*c*d+2*b*c^2-5*b*d^2)*cos( 
f*x+e)/d^2/(c^2-d^2)^2/f/(c+d*sin(f*x+e))
 
3.7.92.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(501\) vs. \(2(245)=490\).

Time = 6.18 (sec) , antiderivative size = 501, normalized size of antiderivative = 2.04 \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\frac {-\frac {4 \left (81 b c d^4-9 b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )-27 \left (2 c^2 d^3+d^5\right )\right ) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\left (c^2-d^2\right )^{5/2}}+\frac {4 b^3 c^6 e-6 b^3 c^4 d^2 e+2 b^3 d^6 e+4 b^3 c^6 f x-6 b^3 c^4 d^2 f x+2 b^3 d^6 f x+2 (b c-3 d)^2 d \left (2 b c^3+12 c^2 d-5 b c d^2-3 d^3\right ) \cos (e+f x)-2 b^3 \left (-c^2 d+d^3\right )^2 (e+f x) \cos (2 (e+f x))+8 b^3 c^5 d e \sin (e+f x)-16 b^3 c^3 d^3 e \sin (e+f x)+8 b^3 c d^5 e \sin (e+f x)+8 b^3 c^5 d f x \sin (e+f x)-16 b^3 c^3 d^3 f x \sin (e+f x)+8 b^3 c d^5 f x \sin (e+f x)+3 b^3 c^4 d^2 \sin (2 (e+f x))-9 b^2 c^3 d^3 \sin (2 (e+f x))-27 b c^2 d^4 \sin (2 (e+f x))-6 b^3 c^2 d^4 \sin (2 (e+f x))+81 c d^5 \sin (2 (e+f x))+36 b^2 c d^5 \sin (2 (e+f x))-54 b d^6 \sin (2 (e+f x))}{\left (c^2-d^2\right )^2 (c+d \sin (e+f x))^2}}{4 d^3 f} \]

input
Integrate[(3 + b*Sin[e + f*x])^3/(c + d*Sin[e + f*x])^3,x]
 
output
((-4*(81*b*c*d^4 - 9*b^2*d^3*(c^2 + 2*d^2) + b^3*(2*c^5 - 5*c^3*d^2 + 6*c* 
d^4) - 27*(2*c^2*d^3 + d^5))*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^ 
2]])/(c^2 - d^2)^(5/2) + (4*b^3*c^6*e - 6*b^3*c^4*d^2*e + 2*b^3*d^6*e + 4* 
b^3*c^6*f*x - 6*b^3*c^4*d^2*f*x + 2*b^3*d^6*f*x + 2*(b*c - 3*d)^2*d*(2*b*c 
^3 + 12*c^2*d - 5*b*c*d^2 - 3*d^3)*Cos[e + f*x] - 2*b^3*(-(c^2*d) + d^3)^2 
*(e + f*x)*Cos[2*(e + f*x)] + 8*b^3*c^5*d*e*Sin[e + f*x] - 16*b^3*c^3*d^3* 
e*Sin[e + f*x] + 8*b^3*c*d^5*e*Sin[e + f*x] + 8*b^3*c^5*d*f*x*Sin[e + f*x] 
 - 16*b^3*c^3*d^3*f*x*Sin[e + f*x] + 8*b^3*c*d^5*f*x*Sin[e + f*x] + 3*b^3* 
c^4*d^2*Sin[2*(e + f*x)] - 9*b^2*c^3*d^3*Sin[2*(e + f*x)] - 27*b*c^2*d^4*S 
in[2*(e + f*x)] - 6*b^3*c^2*d^4*Sin[2*(e + f*x)] + 81*c*d^5*Sin[2*(e + f*x 
)] + 36*b^2*c*d^5*Sin[2*(e + f*x)] - 54*b*d^6*Sin[2*(e + f*x)])/((c^2 - d^ 
2)^2*(c + d*Sin[e + f*x])^2))/(4*d^3*f)
 
3.7.92.3 Rubi [A] (verified)

Time = 1.14 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.25, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3042, 3271, 3042, 3500, 25, 3042, 3214, 3042, 3139, 1083, 217}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3}dx\)

\(\Big \downarrow \) 3271

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\int \frac {-2 c d a^3+5 b d^2 a^2-4 b^2 c d a+b^3 c^2-2 b^3 \left (c^2-d^2\right ) \sin ^2(e+f x)-\left (-d^2 a^3+4 b c d a^2+b^2 \left (c^2-6 d^2\right ) a+2 b^3 c d\right ) \sin (e+f x)}{(c+d \sin (e+f x))^2}dx}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\int \frac {-2 c d a^3+5 b d^2 a^2-4 b^2 c d a+b^3 c^2-2 b^3 \left (c^2-d^2\right ) \sin (e+f x)^2-\left (-d^2 a^3+4 b c d a^2+b^2 \left (c^2-6 d^2\right ) a+2 b^3 c d\right ) \sin (e+f x)}{(c+d \sin (e+f x))^2}dx}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 3500

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {-\frac {\int -\frac {d \left (-d \left (2 c^2+d^2\right ) a^3+9 b c d^2 a^2-3 b^2 d \left (c^2+2 d^2\right ) a-b^3 \left (c^3-4 c d^2\right )\right )-2 b^3 \left (c^2-d^2\right )^2 \sin (e+f x)}{c+d \sin (e+f x)}dx}{d \left (c^2-d^2\right )}-\frac {\left (3 a c d+2 b c^2-5 b d^2\right ) (b c-a d)^2 \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {\int \frac {d \left (-d \left (2 c^2+d^2\right ) a^3+9 b c d^2 a^2-3 b^2 d \left (c^2+2 d^2\right ) a-b^3 \left (c^3-4 c d^2\right )\right )-2 b^3 \left (c^2-d^2\right )^2 \sin (e+f x)}{c+d \sin (e+f x)}dx}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {\int \frac {d \left (-d \left (2 c^2+d^2\right ) a^3+9 b c d^2 a^2-3 b^2 d \left (c^2+2 d^2\right ) a-b^3 \left (c^3-4 c d^2\right )\right )-2 b^3 \left (c^2-d^2\right )^2 \sin (e+f x)}{c+d \sin (e+f x)}dx}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 3214

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {\frac {\left (-a^3 d^3 \left (2 c^2+d^2\right )+9 a^2 b c d^4-3 a b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )\right ) \int \frac {1}{c+d \sin (e+f x)}dx}{d}-\frac {2 b^3 x \left (c^2-d^2\right )^2}{d}}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {\frac {\left (-a^3 d^3 \left (2 c^2+d^2\right )+9 a^2 b c d^4-3 a b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )\right ) \int \frac {1}{c+d \sin (e+f x)}dx}{d}-\frac {2 b^3 x \left (c^2-d^2\right )^2}{d}}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 3139

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {\frac {2 \left (-a^3 d^3 \left (2 c^2+d^2\right )+9 a^2 b c d^4-3 a b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )\right ) \int \frac {1}{c \tan ^2\left (\frac {1}{2} (e+f x)\right )+2 d \tan \left (\frac {1}{2} (e+f x)\right )+c}d\tan \left (\frac {1}{2} (e+f x)\right )}{d f}-\frac {2 b^3 x \left (c^2-d^2\right )^2}{d}}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {-\frac {4 \left (-a^3 d^3 \left (2 c^2+d^2\right )+9 a^2 b c d^4-3 a b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )\right ) \int \frac {1}{-\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )^2-4 \left (c^2-d^2\right )}d\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )}{d f}-\frac {2 b^3 x \left (c^2-d^2\right )^2}{d}}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (a+b \sin (e+f x))}{2 d f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}-\frac {\frac {\frac {2 \left (-a^3 d^3 \left (2 c^2+d^2\right )+9 a^2 b c d^4-3 a b^2 d^3 \left (c^2+2 d^2\right )+b^3 \left (2 c^5-5 c^3 d^2+6 c d^4\right )\right ) \arctan \left (\frac {2 c \tan \left (\frac {1}{2} (e+f x)\right )+2 d}{2 \sqrt {c^2-d^2}}\right )}{d f \sqrt {c^2-d^2}}-\frac {2 b^3 x \left (c^2-d^2\right )^2}{d}}{d \left (c^2-d^2\right )}-\frac {(b c-a d)^2 \left (3 a c d+2 b c^2-5 b d^2\right ) \cos (e+f x)}{d f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 d \left (c^2-d^2\right )}\)

input
Int[(a + b*Sin[e + f*x])^3/(c + d*Sin[e + f*x])^3,x]
 
output
((b*c - a*d)^2*Cos[e + f*x]*(a + b*Sin[e + f*x]))/(2*d*(c^2 - d^2)*f*(c + 
d*Sin[e + f*x])^2) - (((-2*b^3*(c^2 - d^2)^2*x)/d + (2*(9*a^2*b*c*d^4 - a^ 
3*d^3*(2*c^2 + d^2) - 3*a*b^2*d^3*(c^2 + 2*d^2) + b^3*(2*c^5 - 5*c^3*d^2 + 
 6*c*d^4))*ArcTan[(2*d + 2*c*Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2])])/(d*Sq 
rt[c^2 - d^2]*f))/(d*(c^2 - d^2)) - ((b*c - a*d)^2*(2*b*c^2 + 3*a*c*d - 5* 
b*d^2)*Cos[e + f*x])/(d*(c^2 - d^2)*f*(c + d*Sin[e + f*x])))/(2*d*(c^2 - d 
^2))
 

3.7.92.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3139
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre 
eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + 2*b*e*x + a 
*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ 
[a^2 - b^2, 0]
 

rule 3214
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. 
)*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d   Int[1/(c + d 
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

rule 3271
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(b^2*c^2 - 2*a*b*c*d + a^2*d^2))*Co 
s[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f* 
(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^2))   Int[(a + b*Sin 
[e + f*x])^(m - 3)*(c + d*Sin[e + f*x])^(n + 1)*Simp[b*(m - 2)*(b*c - a*d)^ 
2 + a*d*(n + 1)*(c*(a^2 + b^2) - 2*a*b*d) + (b*(n + 1)*(a*b*c^2 + c*d*(a^2 
+ b^2) - 3*a*b*d^2) - a*(n + 2)*(b*c - a*d)^2)*Sin[e + f*x] + b*(b^2*(c^2 - 
 d^2) - m*(b*c - a*d)^2 + d*n*(2*a*b*c - d*(a^2 + b^2)))*Sin[e + f*x]^2, x] 
, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - 
b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 2] && LtQ[n, -1] && (IntegerQ[m] || 
IntegersQ[2*m, 2*n])
 

rule 3500
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
 (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 
 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* 
(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2))   Int[(a + b*Sin[e + f*x 
])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A 
*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, 
B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
 
3.7.92.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(669\) vs. \(2(246)=492\).

Time = 1.77 (sec) , antiderivative size = 670, normalized size of antiderivative = 2.73

method result size
derivativedivides \(\frac {\frac {2 b^{3} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{d^{3}}+\frac {\frac {2 \left (\frac {d^{2} \left (5 a^{3} c^{2} d^{3}-2 a^{3} d^{5}-9 a^{2} b \,c^{3} d^{2}+3 a \,b^{2} c^{4} d +6 a \,b^{2} c^{2} d^{3}+b^{3} c^{5}-4 b^{3} c^{3} d^{2}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 \left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) c}+\frac {d \left (4 a^{3} c^{4} d^{3}+7 a^{3} c^{2} d^{5}-2 a^{3} d^{7}-6 a^{2} b \,c^{5} d^{2}-15 a^{2} b \,c^{3} d^{4}-6 a^{2} b c \,d^{6}+9 a \,b^{2} c^{4} d^{3}+18 a \,b^{2} c^{2} d^{5}+2 b^{3} c^{7}-b^{3} c^{5} d^{2}-10 b^{3} c^{3} d^{4}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 \left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) c^{2}}+\frac {d^{2} \left (11 a^{3} c^{2} d^{3}-2 a^{3} d^{5}-15 a^{2} b \,c^{3} d^{2}-12 a^{2} b c \,d^{4}-3 a \,b^{2} c^{4} d +30 a \,b^{2} c^{2} d^{3}+7 b^{3} c^{5}-16 b^{3} c^{3} d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 c \left (c^{4}-2 c^{2} d^{2}+d^{4}\right )}+\frac {d \left (4 a^{3} c^{2} d^{3}-a^{3} d^{5}-6 a^{2} b \,c^{3} d^{2}-3 a^{2} b c \,d^{4}+9 a \,b^{2} c^{2} d^{3}+2 b^{3} c^{5}-5 b^{3} c^{3} d^{2}\right )}{2 c^{4}-4 c^{2} d^{2}+2 d^{4}}\right )}{{\left (\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c \right )}^{2}}+\frac {\left (2 a^{3} c^{2} d^{3}+a^{3} d^{5}-9 a^{2} b c \,d^{4}+3 a \,b^{2} c^{2} d^{3}+6 a \,b^{2} d^{5}-2 b^{3} c^{5}+5 b^{3} c^{3} d^{2}-6 d^{4} b^{3} c \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{\left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) \sqrt {c^{2}-d^{2}}}}{d^{3}}}{f}\) \(670\)
default \(\frac {\frac {2 b^{3} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{d^{3}}+\frac {\frac {2 \left (\frac {d^{2} \left (5 a^{3} c^{2} d^{3}-2 a^{3} d^{5}-9 a^{2} b \,c^{3} d^{2}+3 a \,b^{2} c^{4} d +6 a \,b^{2} c^{2} d^{3}+b^{3} c^{5}-4 b^{3} c^{3} d^{2}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 \left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) c}+\frac {d \left (4 a^{3} c^{4} d^{3}+7 a^{3} c^{2} d^{5}-2 a^{3} d^{7}-6 a^{2} b \,c^{5} d^{2}-15 a^{2} b \,c^{3} d^{4}-6 a^{2} b c \,d^{6}+9 a \,b^{2} c^{4} d^{3}+18 a \,b^{2} c^{2} d^{5}+2 b^{3} c^{7}-b^{3} c^{5} d^{2}-10 b^{3} c^{3} d^{4}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 \left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) c^{2}}+\frac {d^{2} \left (11 a^{3} c^{2} d^{3}-2 a^{3} d^{5}-15 a^{2} b \,c^{3} d^{2}-12 a^{2} b c \,d^{4}-3 a \,b^{2} c^{4} d +30 a \,b^{2} c^{2} d^{3}+7 b^{3} c^{5}-16 b^{3} c^{3} d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 c \left (c^{4}-2 c^{2} d^{2}+d^{4}\right )}+\frac {d \left (4 a^{3} c^{2} d^{3}-a^{3} d^{5}-6 a^{2} b \,c^{3} d^{2}-3 a^{2} b c \,d^{4}+9 a \,b^{2} c^{2} d^{3}+2 b^{3} c^{5}-5 b^{3} c^{3} d^{2}\right )}{2 c^{4}-4 c^{2} d^{2}+2 d^{4}}\right )}{{\left (\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c \right )}^{2}}+\frac {\left (2 a^{3} c^{2} d^{3}+a^{3} d^{5}-9 a^{2} b c \,d^{4}+3 a \,b^{2} c^{2} d^{3}+6 a \,b^{2} d^{5}-2 b^{3} c^{5}+5 b^{3} c^{3} d^{2}-6 d^{4} b^{3} c \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{\left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) \sqrt {c^{2}-d^{2}}}}{d^{3}}}{f}\) \(670\)
risch \(\text {Expression too large to display}\) \(2015\)

input
int((a+b*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x,method=_RETURNVERBOSE)
 
output
1/f*(2*b^3/d^3*arctan(tan(1/2*f*x+1/2*e))+2/d^3*((1/2*d^2*(5*a^3*c^2*d^3-2 
*a^3*d^5-9*a^2*b*c^3*d^2+3*a*b^2*c^4*d+6*a*b^2*c^2*d^3+b^3*c^5-4*b^3*c^3*d 
^2)/(c^4-2*c^2*d^2+d^4)/c*tan(1/2*f*x+1/2*e)^3+1/2*d*(4*a^3*c^4*d^3+7*a^3* 
c^2*d^5-2*a^3*d^7-6*a^2*b*c^5*d^2-15*a^2*b*c^3*d^4-6*a^2*b*c*d^6+9*a*b^2*c 
^4*d^3+18*a*b^2*c^2*d^5+2*b^3*c^7-b^3*c^5*d^2-10*b^3*c^3*d^4)/(c^4-2*c^2*d 
^2+d^4)/c^2*tan(1/2*f*x+1/2*e)^2+1/2*d^2*(11*a^3*c^2*d^3-2*a^3*d^5-15*a^2* 
b*c^3*d^2-12*a^2*b*c*d^4-3*a*b^2*c^4*d+30*a*b^2*c^2*d^3+7*b^3*c^5-16*b^3*c 
^3*d^2)/c/(c^4-2*c^2*d^2+d^4)*tan(1/2*f*x+1/2*e)+1/2*d*(4*a^3*c^2*d^3-a^3* 
d^5-6*a^2*b*c^3*d^2-3*a^2*b*c*d^4+9*a*b^2*c^2*d^3+2*b^3*c^5-5*b^3*c^3*d^2) 
/(c^4-2*c^2*d^2+d^4))/(tan(1/2*f*x+1/2*e)^2*c+2*d*tan(1/2*f*x+1/2*e)+c)^2+ 
1/2*(2*a^3*c^2*d^3+a^3*d^5-9*a^2*b*c*d^4+3*a*b^2*c^2*d^3+6*a*b^2*d^5-2*b^3 
*c^5+5*b^3*c^3*d^2-6*b^3*c*d^4)/(c^4-2*c^2*d^2+d^4)/(c^2-d^2)^(1/2)*arctan 
(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))))
 
3.7.92.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 812 vs. \(2 (246) = 492\).

Time = 0.35 (sec) , antiderivative size = 1707, normalized size of antiderivative = 6.97 \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\text {Too large to display} \]

input
integrate((a+b*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x, algorithm="fricas")
 
output
[1/4*(4*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 5*a*b^2)*c^3*d^5 - (a^2 
*b - 2*b^3)*c^2*d^6 - (a^3 + 4*a*b^2)*c*d^7)*cos(f*x + e))*sin(f*x + e))/( 
(c^6*d^5 - 3*c^4*d^7 + 3*c^2*d^9 - d^11)*f*cos(f*x + e)^2 - 2*(c^7*d^4 - 3 
*c^5*d^6 + 3*c^3*d^8 - c*d^10)*f*sin(f*x + e) - (c^8*d^3 - 2*c^6*d^5 + 2*c 
^2*d^9 - d^11)*f), 1/2*(2*(b^3*c^6*d^2 - 3*b^3*c^4*d^4 + 3*b^3*c^2*d^6 - b 
^3*d^8)*f*x*cos(f*x + e)^2 - 2*(b^3*c^8 - 2*b^3*c^6*d^2 + 2*b^3*c^2*d^6...
 
3.7.92.6 Sympy [F(-1)]

Timed out. \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\text {Timed out} \]

input
integrate((a+b*sin(f*x+e))**3/(c+d*sin(f*x+e))**3,x)
 
output
Timed out
 
3.7.92.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\text {Exception raised: ValueError} \]

input
integrate((a+b*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*d^2-4*c^2>0)', see `assume?` f 
or more de
 
3.7.92.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 858 vs. \(2 (246) = 492\).

Time = 0.34 (sec) , antiderivative size = 858, normalized size of antiderivative = 3.50 \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\text {Too large to display} \]

input
integrate((a+b*sin(f*x+e))^3/(c+d*sin(f*x+e))^3,x, algorithm="giac")
 
output
((f*x + e)*b^3/d^3 - (2*b^3*c^5 - 5*b^3*c^3*d^2 - 2*a^3*c^2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1/2*e) + 11*a^3*c^3*d^4*tan(1/2*f*x + 1/2*e) + 30*a*b^2 
*c^3*d^4*tan(1/2*f*x + 1/2*e) - 12*a^2*b*c^2*d^5*tan(1/2*f*x + 1/2*e) - 2* 
a^3*c*d^6*tan(1/2*f*x + 1/2*e) + 2*b^3*c^7 - 6*a^2*b*c^5*d^2 - 5*b^3*c^5*d 
^2 + 4*a^3*c^4*d^3 + 9*a*b^2*c^4*d^3 - 3*a^2*b*c^3*d^4 - a^3*c^2*d^5)/((c^ 
6*d^2 - 2*c^4*d^4 + c^2*d^6)*(c*tan(1/2*f*x + 1/2*e)^2 + 2*d*tan(1/2*f*...
 
3.7.92.9 Mupad [B] (verification not implemented)

Time = 22.21 (sec) , antiderivative size = 11848, normalized size of antiderivative = 48.36 \[ \int \frac {(3+b \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\text {Too large to display} \]

input
int((a + b*sin(e + f*x))^3/(c + d*sin(e + f*x))^3,x)
 
output
- ((a^3*d^5 - 2*b^3*c^5 - 4*a^3*c^2*d^3 + 5*b^3*c^3*d^2 - 9*a*b^2*c^2*d^3 
+ 6*a^2*b*c^3*d^2 + 3*a^2*b*c*d^4)/(d^2*(c^4 + d^4 - 2*c^2*d^2)) - (tan(e/ 
2 + (f*x)/2)^3*(b^3*c^5 - 2*a^3*d^5 + 5*a^3*c^2*d^3 - 4*b^3*c^3*d^2 + 6*a* 
b^2*c^2*d^3 - 9*a^2*b*c^3*d^2 + 3*a*b^2*c^4*d))/(c*d*(c^4 + d^4 - 2*c^2*d^ 
2)) + (tan(e/2 + (f*x)/2)*(2*a^3*d^5 - 7*b^3*c^5 - 11*a^3*c^2*d^3 + 16*b^3 
*c^3*d^2 - 30*a*b^2*c^2*d^3 + 15*a^2*b*c^3*d^2 + 3*a*b^2*c^4*d + 12*a^2*b* 
c*d^4))/(c*d*(c^4 + d^4 - 2*c^2*d^2)) + (tan(e/2 + (f*x)/2)^2*(c^2 + 2*d^2 
)*(a^3*d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